250bd99c7828ab57ce4603683b2890904312c7c8,enterprise/ha/src/main/java/org/neo4j/kernel/ha/cluster/HighAvailabilityMemberStateMachine.java,StateMachineClusterEventListener,coordinatorIsElected,#InstanceId#,129

Before Change


                    final HighAvailabilityMemberChangeEvent event = new HighAvailabilityMemberChangeEvent( oldState,
                            state, coordinatorId,
                            null );
                    boolean successful = Listeners.notifyListeners( memberListeners,
                            new Listeners.Notification<HighAvailabilityMemberListener>()
                            {
                                @Override
                                public void notify( HighAvailabilityMemberListener listener )
                                {
                                    listener.masterIsElected( event );
                                }
                            } );
                    
                    if ( successful )
                    {
                        context.setAvailableHaMasterId( null );
    
                        if ( oldState.isAccessAllowed() && oldState != state )
                        {
                            availabilityGuard.deny(HighAvailabilityMemberStateMachine.this);
                        }
    
                        logger.debug( "Got masterIsElected(" + coordinatorId + "), changed " + oldState + " -> " +
                                state + ". Previous elected master is " + previousElected );
                    }
                    else
                    {
                        logger.debug( "Got masterIsElected(" + coordinatorId +
                                "), but applying it was not successful so keeps state " + oldState +
                                " even though the desired state transaction would have been to " + state );
                        state = oldState;
                    }
                }

After Change


                    final HighAvailabilityMemberChangeEvent event = new HighAvailabilityMemberChangeEvent( oldState,
                            state, coordinatorId,
                            null );
                    Listeners.notifyListeners( memberListeners,
                            new Listeners.Notification<HighAvailabilityMemberListener>()
                            {
                                @Override
                                public void notify( HighAvailabilityMemberListener listener )
                                {
                                    listener.masterIsElected( event );
                                }
                            } );
                    context.setAvailableHaMasterId( null );

                    if ( oldState.isAccessAllowed() && oldState != state )